\begin{equation}
  \label{eq:1}
  \hat{H} = - J \sum_{<ij>} \hat{\sigma}^z_i \hat{\sigma}^z_j - B  \sum_i \hat{\sigma}^x\text{, where $<ij>$ means nearest neighbours}
\end{equation}
Let's try to map partition function first.

\begin{gather}
  Z = \tr e^{- \beta \hat{H}}\\
= \tr (e^{\beta J \sum_{<ij>} \hat{\sigma}^z_i \hat{\sigma}^z_j + \beta B  \sum_i \hat{\sigma}^x})\\
= \tr ((e^{\beta J/L \sum_{<ij>} \hat{\sigma}^z_i \hat{\sigma}^z_j + \beta B/L  \sum_i \hat{\sigma}^x})^L)\\
= \sum_{S_1,S_2,\ldots,S_N} \lan S_{11}, S_{21},\ldots, S_{N1} | (e^{\Delta \tau J \sum_{<ij>} \hat{\sigma}^z_i \hat{\sigma}^z_j + \Delta \tau J  \sum_i \hat{\sigma}^x})^L|S_{11}, S_{21},\ldots, S_{N1} \ran\\
 =\sum_{S_1,S_2,\ldots,S_N} \lan S_{11}, S_{21},\ldots, S_{N1} | (e^{\Delta \tau J \sum_{<ij>} \hat{\sigma}^z_i \hat{\sigma}^z_j} e^{\Delta \tau J  \sum_i \hat{\sigma}^x})^L|S_{11}, S_{21},\ldots, S_{N1} \ran\\
H_J = - \Delta \tau J \sum_{<ij>} \hat{\sigma}^z_i \hat{\sigma}^z_j\\
H_B = -\Delta \tau J  \sum_i \hat{\sigma}^x \\
=\sum_{S_1,S_2,\ldots,S_N} \lan S_{11}, S_{21},\ldots, S_{N1} | (e^{- H_J} e^{- H_B})^L|S_{11}, S_{21},\ldots, S_{N1} \ran\\
=\sum_{S_1,S_2,\ldots,S_N} \lan S_{11}, S_{21},\ldots, S_{N1} | e^{- H_J} e^{- H_B}|S_{11}, S_{21},\ldots, S_{N1} \ran \times\\ 
\times \lan S_{12}, S_{22},\ldots, S_{N2} | e^{- H_J} e^{- H_B}|S_{13}, S_{23},\ldots, S_{N3} \ran \times\\
\dots\\
\times \lan S_{1L}, S_{2L},\ldots, S_{NL} | e^{- H_J} e^{- H_B}|S_{1L}, S_{2L},\ldots, S_{NL} \ran
\end{gather}

Let's consider one matrix element

\begin{gather}
\lan S_{1l}, S_{2l},\ldots, S_{Nl} | e^{- H_J} e^{- H_B}|S_{1l}, S_{2l},\ldots, S_{Nl} \ran  \\
= e^{J \Delta \tau \sum_{i}s_i \eta_i^H} \lan S_{1l}, S_{2l},\ldots, S_{Nl} | e^{\Delta \tau B \sum_i \sigma^x_i}|S_{1(l+1)}, S_{2(l+1)},\ldots, S_{N(l+1)} \ran\\
= e^{J \Delta \tau \sum_{i}s_i \eta_i^H} \prod_i \lan S_{1l}, S_{2l},\ldots, S_{Nl} | e^{\Delta \tau B s^x_i}|S_{1(l+1)}, S_{2(l+1)},\ldots, S_{N(l+1)} \ran\\
|+1\ran_z = \frac{|+1\ran_x + |-1\ran_x} {\sqrt{2}}
\end{gather}

\begin{gather}
\lan S_{il}, S_{il},\ldots, S_{il} | e^{\Delta \tau B s^x_i}|S_{i(l+1)}, S_{i(l+1)},\ldots, S_{i(l+1)} \ran = e^{- \lambda s_{il}^z s^z_{i(l+1)}}\\
\lan S_{il}, S_{il},\ldots, S_{il} | e^{\Delta \tau B s^x_i}|S_{i(l+1)}, S_{i(l+1)},\ldots, S_{i(l+1)} \ran =\\
= \lan S_{il}| e^{- \Delta \tau B 1}| 1 \ran_{x, l+1} + \lan S_{il}|e^{\Delta \tau B (-1)}| -1 \ran_{x, l+1} 
\end{gather}

%we should add  more steps in next formulas

if $|S_{il}\ran = |+1\ran_z$ then
\begin{gather}
  \lan S_{il}| e^{- \Delta \tau B 1}| 1 \ran_{x, l+1} + \lan S_{il}|e^{\Delta \tau B (-1)}| -1 \ran_{x, l+1} \\
= \frac 1 2 ( e^{\Delta \tau B} + e^{- \Delta \tau B}) = \cosh{\Delta \tau B} 
\end{gather}
else if $|S_{il}\ran = |-1\ran_z$ then
\begin{gather}
\lan S_{il}| e^{- \Delta \tau B 1}| 1 \ran_{x, l+1} + \lan S_{il}|e^{\Delta \tau B (-1)}| -1 \ran_{x, l+1} \\
= \frac 1 2 ( e^{\Delta \tau B} - e^{- \Delta \tau B}) = \sinh{\Delta \tau B}  
\end{gather}

if $S_{i,(l+1)} = | -1 \ran_z = \frac{|+1\ran_x - |-1\ran_x} {\sqrt{2}}$ then\\
if $|S_{il}\ran = |-1\ran_z$ 
\begin{gather}
  \lan S_{il}| e^{- \Delta \tau B 1}| 1 \ran_{x, l+1} - \lan S_{il}|e^{\Delta \tau B (-1)}| -1 \ran_{x, l+1} \\
= \frac 1 2 ( e^{\Delta \tau B} + e^{- \Delta \tau B}) = \cosh{\Delta \tau B}
\end{gather}
if $|S_{il}\ran = |+1\ran_z$  then
\begin{gather}
\lan S_{il}| e^{- \Delta \tau B 1}| 1 \ran_{x, l+1} - \lan S_{il}|e^{\Delta \tau B (-1)}| -1 \ran_{x, l+1} \\
= \frac 1 2 ( e^{\Delta \tau B} - e^{- \Delta \tau B}) = \sinh{\Delta \tau B}  
\end{gather}

It means that if $s_{il} = s_{i (l+1)}$ then $e^{\lambda s_{il}^z s^z_{il}} = e^{\lambda} = \cosh \Delta \tau B$\\
and if $s_{il} = - s_{i (l+1)}$ then $e^{\lambda s_{il}^z s^z_{il}} = e^{\lambda} = \sinh \Delta \tau B$\\
\rar $\lambda = - \frac 1 2 \ln \tanh (\Delta \tau B)$\\

The aim of all this crazy derivation is to map quantum Ising model in transverse field to classical but wierd model.

So:

\begin{gather}
   Z = \tr e^{- \beta \hat{H}} =\\
\sum_{S_1 = \pm 1} \sum_{S_2 = \pm 1} \dots \sum_{S_N = \pm 1} e^{\Delta \tau J \sum_i s_{il} \eta^H_{il} + \lambda \sum_i s_{il} \eta_{il}^V}
\end{gather}
